import Mock from "mockjs";
// 菜单数组
const menu = [
  {
    path: "/",
    name: "layout",
    meta: {
      title: "layout",
      hidden: "false",
      icon: "House",
    },
    component: "@/layout/index.vue",
    redirect: "/home",
    //
    children: [
      {
        path: "/home",
        name: "首页",
        meta: {
          title: "首页",
          hidden: "false",
          icon: "House",
        },
        component: "@/view/home/home.vue",
      },
    ],
  },
  // 仪表盘
  {
    path: "/dashboard",
    name: "dashboard",
    meta: {
      hidden: "false",
      title: "仪表盘",
      icon: "Odometer",
    },
    component: "@/layout/index.vue",
    children: [
      {
        path: "/dashboard",
        name: "dashboardTable",
        meta: {
          hidden: "false",
          title: "仪表盘",
          icon: "Odometer",
        },
        component: "@/view/dashboard/dashboard.vue",
      },
    ],
  },
  {
    path: "/user",
    name: "user",
    meta: {
      hidden: "false",
      title: "系统管理",
      icon: "Setting",
    },
    component: "@/layout/index.vue",
    children: [
      // 用户信息
      {
        path: "/user/userAdmin",
        name: "userAdmin",
        meta: {
          hidden: "false",
          title: "用户管理",
          icon: "User",
        },
        component: "@/view/user/userAdmin/index.vue",
      },
      {
        path: "/user/acl",
        name: "acl",
        meta: {
          hidden: "false",
          title: "角色管理",
          icon: "Stamp",
        },
        component: "@/view/user/acl/index.vue",
      },
      {
        path: "/user/menu",
        name: "menu",
        meta: {
          hidden: "false",
          title: "菜单管理",
          icon: "Management",
        },
        component: "@/view/user/menu/index.vue",
      },
    ],
  },
  // 商品管理
  {
    path: "/shop",
    name: "shop",
    meta: {
      hidden: "false",
      title: "店铺管理",
      icon: "Present",
    },
    component: "@/layout/index.vue",
    children: [
      {
        path: "/shop/shopManage",
        name: "shopManage",
        meta: {
          hidden: "false",
          title: "商品管理",
          icon: "Goods",
        },
        component: "@/view/shopCategory/shopManage/index.vue",
      },
      {
        path: "/shop/shopList",
        name: "shopList",
        meta: {
          hidden: "false",
          title: "商品列表",
          icon: "List",
        },
        component: "@/view/shopCategory/shopList/index.vue",
      },
      {
        path: "/shop/shopMoney",
        name: "shopMoney",
        meta: {
          hidden: "false",
          title: "收银台",
          icon: "Money",
        },
        component: "@/view/shopCategory/shopMoney/index.vue",
      },
    ],
  },
  // 模板
  {
    path: "/template",
    name: "template",
    meta: {
      hidden: "false",
      title: "模板",
      icon: "Grid",
    },
    component: "@/layout/index.vue",
    children: [
      {
        path: "/template/lotTemplate",
        name: "lotTemplate",
        meta: {
          hidden: "false",
          title: "模板",
          icon: "Grid",
        },
        component: "@/view/template/lotTemplate/index.vue",
      },
    ],
  },
  // 个人信息
  {
    path: "/person",
    name: "person",
    meta: {
      hidden: "false",
      title: "个人信息",
      icon: "User",
    },
    component: "@/layout/index.vue",
    children: [
      {
        path: "/personMessage",
        name: "personMessage",
        meta: {
          hidden: "false",
          title: "个人信息",
          icon: "User",
        },
        component: "@/view/person/person.vue",
      },
    ],
  },
  // GPT问答
  {
    path: "/ai",
    name: "ai",
    meta: {
      hidden: "false",
      title: "GPT 问答",
    },
    component: "@/layout/index.vue",
    children: [
      {
        path: "/ai/aiQuestion",
        name: "aiQuestion",
        meta: {
          hidden: "false",
          title: "GPT 问答",
          icon: "ChatDotSquare",
        },
        component: "@/view/Ai/aiQuestion.vue",
      },
    ],
  },
  // 数据大屏
  {
    path: "/dataScreen",
    name: "数据大屏",
    meta: {
      title: "数据大屏",
      hidden: "false",
      icon: "DataBoard",
    },
    component: "@/view/dataScreen/dataScreen.vue",
  },
];

//获取menu
Mock.mock(`/api/menu`, "get", (options) => {
  return {
    code: 200,
    message: "获取菜单数据成功",
    data: menu,
  };
});
